import $http from '../assets/js/http'
export async function IsVote(pwd) {
  return $http.post("NianHui/IsVote", {
    pwd
  })
}

// 校验工号是否正确
export async function checkJobNumber(jobNumber) {
  return $http.post("NianHui/checkJobNumber", {
    jobNumber
  })
}

// 投票
export async function voteSubmit(program, jobNumber, name) {
  return $http.post("NianHui/vote", {
    program,
    jobNumber,
    name
  })
}

// 获取投票结果
export async function getRank() {
  return $http.get("NianHui/getRank")
}

// 获取抽奖名单
export async function getPerson() {
  return $http.get("NianHui/getPerson")
}

// 校验时间
export async function cTime() {
  return $http.get("NianHui/cTime");
}

// 
export async function drawPrize(name, jobNumber, type) {
  return $http.post("NianHui/drawPrize", {
    name,
    jobNumber,
    type
  });
}
